#include "implementations/context/ChakraContextImpl.h"

namespace chakra
{
	ChakraContextImpl::ChakraContextImpl()
		: m_world(new chakra::World())
	{
		m_roadNetwork = new vnav::RoadNetwork("");
	}

	ChakraContextImpl::~ChakraContextImpl()
	{

	}

	chakra::World& const ChakraContextImpl::getWorld()
	{ 
		return *m_world; 
	}

	vnav::RoadNetwork& ChakraContextImpl::getRoadNetwork()
	{ 
		return *m_roadNetwork; 
	}

	/* public functions */
	IChakraContext& getChakraContext()
	{
		static IChakraContext* const context = new ChakraContextImpl();
		return *context;
	}

}